﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Aandelendelen.Db
{
	public class DbUtils
	{
		public static string GetConnectionString(AandelenDelenDb db)
		{
			string connectionName;

			switch (db)
			{
				case AandelenDelenDb.AandelenDelen: connectionName = "Main";
					break;
				case AandelenDelenDb.AandelenDelenAd: connectionName = "Ad";
					break;
				case AandelenDelenDb.AandelenDelenMail: connectionName = "Mail";
					break;
				default: connectionName = "Main";
					break;
			}

			return ConfigurationManager.ConnectionStrings[connectionName].ConnectionString;
		}
	}
}
